<!DOCTYPE html>
<html>
<head>
<meta name="viewport"/>
<include file="/Tpl/head"/>
<css file="__PUBLIC__/user.css"/>
</head>
<body>
<div class="am-container">
    <include file="/Tpl/User/u_head"/>
    <form action="{:U('User/register')}" onsubmit="return valid();" method="post">
        <table class="login-tb">
            <tr>
                <td colspan="2" style="font-size: 14px;text-align: center;"><a href="{:U('User/login')}">会员登陆</a>&emsp;会员注册</td>
            </tr>
            <tr>
                <td width="30%">用户名：</td>
                <td><input id="username" class="user" type="text" name="username"/></td>
            </tr>
            <tr>
                <td>密&emsp;码：</td>
                <td><input id="userpass" class="user" type="password" name="userpass"/></td>
            </tr>
            <tr>
                <td>邮&emsp;箱：</td>
                <td><input class="user" type="text" name="email"/></td>
            </tr>
            <tr>
                <td colspan="2"><input class="button-b" type="submit" value="注册"/></td>
            </tr>
        </table>
    </form>
    <script>
        function valid(){
            var names=$('#username').val();
            var passs=$('#userpass').val();
            if(names.replace(/\s+/g,"").length==0){
                alert('请输入用户名！');
                return false;
            }
            if(passs.replace(/\s+/g,"").length==0){
                alert('请输入密码！');
                return false;
            }
            return true;
        }
    </script>
        <include file="/Tpl/User/u_bottom"/>
</div>
</body>
</html>